var userAdmin = {

	my_override_label : Ext.override(Ext.form.Label, {
		setText : function(t) {
			this.text = t;
			if (this.rendered) {
				this.el.update(t);
			}
		},
		getText : function() {
			return this.text;
		}

	}),

	show_user_admin : function() {

		var mtext = '平台目前拥有的用户数为：';

		var label = new this.my_override_label({
			text : mtext,
		})

		var search_function = function() {
			Ext.Ajax.request({
				url : 'userstatistics',
				params : {
					adminOpt : 'totalUser',
				},
				success : function(response) {
					var text = response.responseText;
					label.setText(mtext + text);
				}
			});
		}

		var form = new Ext.form.FormPanel({
			frame : true,
			title : "用户统计",
			style : "margin:10px",
			buttonAlign : 'left',
			bodyStyle : 'padding:6px 0px 0px 15px',
			items : [ label ],
			labelAlign : 'right',
			labelWidth : 45,
		});

		var win = new Ext.Window({
			title : '统计',
			width : 476,
			height : 374,
			resizable : true,
			modal : true,
			closable : true,
			maximizable : true,
			minimizable : true,
			items : [ form ],
		});
		win.show();
		search_function();
	},
}
